import request from '@/sheep/request';
// import $platform from '@/sheep/platform';

export default {
	minilogin: (data) =>
		request({
			url: 'user/login',
			method: 'POST',
			data,
			custom: {
				auth: false,
				showSuccess: true,
				showLoading: true,
				loadingMsg: '登录中...'
			},
		}),
	getUserInfo: (data) =>
		request({
			url: 'user/userinfo',
			method: 'GET',
			data,
			custom: {
				auth: true,
				showSuccess: false,
				showLoading: false
			},
		}),
	// 修改会员个人信息
	editProfile: (data) =>
		request({
			url: 'user/profile',
			method: 'POST',
			data,
			custom: {
				auth: true,
				showSuccess: true,
				showLoading: true,
				loadingMsg: '修改中...',
			},
		}),
	// 首页
	homePage: (data) =>
		request({
			url: 'index/index',
			method: 'POST',
			data,
			custom: {
				auth: false,
				showSuccess: false,
				showLoading: true,
				loadingMsg: '',
			},
		}),
	// 检测报告提交
	jcpreport_save: (data) =>
		request({
			url: 'orders/jcpreport_save',
			method: 'POST',
			data,
			custom: {
				auth: true,
				showSuccess: true,
				showLoading: true,
				loadingMsg: '提交中...',
			},
		}),
	// 配件列表
	peijianlist: (data) =>
		request({
			url: 'orders/peijianlist',
			method: 'POST',
			data,
			custom: {
				auth: true,
				showSuccess: false,
				showLoading: true,
				loadingMsg: '',
			},
		}),
	// 创建订单
	createorder: (data) =>
		request({
			url: 'orders/createorder',
			method: 'POST',
			data,
			custom: {
				auth: true,
				showSuccess: true,
				showLoading: true,
				loadingMsg: '创建中...',
			},
		}),
	// 创建订单
	orderlist: (data) =>
		request({
			url: 'orders/orderlist',
			method: 'POST',
			data,
			custom: {
				auth: true,
				showSuccess: false,
				showLoading: false,
				loadingMsg: '...',
			},
		}),
	// 取消订单
	close_order: (data) =>
		request({
			url: 'orders/close_order',
			method: 'POST',
			data,
			custom: {
				auth: true,
				showSuccess: true,
				showLoading: true,
				loadingMsg: '取消中...',
			},
		}),


	// 订单详情
	orderdetail: (data) =>
		request({
			url: 'orders/orderdetail',
			method: 'POST',
			data,
			custom: {
				auth: true,
				showSuccess: false,
				showLoading: false,
				loadingMsg: '...',
			},
		}),
	// 确认订单
	queren_order: (data) =>
		request({
			url: 'orders/queren_order',
			method: 'POST',
			data,
			custom: {
				auth: true,
				showSuccess: true,
				showLoading: true,
				loadingMsg: '确认中...',
			},
		}),
	// 审核订单
	she_order: (data) =>
		request({
			url: 'orders/she_order',
			method: 'POST',
			data,
			custom: {
				auth: true,
				showSuccess: true,
				showLoading: true,
				loadingMsg: '审核中...',
			},
		}),
	// 复核订单
	fuhe_order: (data) =>
		request({
			url: 'orders/fuhe_order',
			method: 'POST',
			data,
			custom: {
				auth: true,
				showSuccess: true,
				showLoading: true,
				loadingMsg: '复核中...',
			},
		}),
	// 个人统计
	myStatistics: (data) =>
		request({
			url: 'statistics/myStatistics',
			method: 'POST',
			data,
			custom: {
				auth: true,
				showSuccess: false,
				showLoading: false,
				loadingMsg: '',
			},
		}),
	// 门店统计
	storeStatistics: (data) =>
		request({
			url: 'statistics/storeStatistics',
			method: 'POST',
			data,
			custom: {
				auth: true,
				showSuccess: false,
				showLoading: false,
				loadingMsg: '',
			},
		}),
	// 门店统计
	commsion_log: (data) =>
		request({
			url: 'user/commsion_log',
			method: 'POST',
			data,
			custom: {
				auth: true,
				showSuccess: false,
				showLoading: false,
				loadingMsg: '',
			},
		}),

};